﻿using System;

namespace Zuehlke.Blueprint.Quickstart.Architecture.Presentation.Services.Interfaces.BackgroundTasks
{
    /// <summary>
    /// Service for handling all background work.
    /// </summary>
    public interface IBackgroundTasksService
    {
        /// <summary>
        /// Performs a task in the background.
        /// </summary>
        IBackgroundTask PerformInBackground<TResult>(Func<IBackgroundTask, object, TResult> taskHandler,
                                                     Action<IFinishedBackgroundTask<TResult>> callbackHandler,
                                                     object taskData);
    }
}
